<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Promises使用</title>
    <style>
        div.justify {
            text-align: justify;
            width: 200px;
            font-size: 15px;
            color: red;
            border: 1px solid blue;
            height: 18px;
        }

        div.justify>span {
            display: inline-block/* Opera */
            ;
            padding-left: 100%;
        }

        div {
            width: 300px;
            text-align: justify;
        }

        div:after {
            display: inline-block;
            content: '';
            width: 100%;
        }
    </style>
</head>

<body>
    <div class="justify">hello, text justify.</div>
    <br/>
    <div class="justify"> hello, text justify.
        <span></span>
    </div>
    <tbody id="fgbs">
        <tr onclick="setXcg(this)" id="jc-xcg">
            <td> 血常规</td>
            <td align="center"> ${xcg} </td>
            <td class="view-check-pic" data-id="0">${xcgImage}</td>
        </tr>
        <tr onclick="setNxsx(this)" id="jc-nxsx">
            <td>凝血六项</td>
            <td align="center">${nxsx}</td>
            <td class="view-check-pic" data-id="17">${nxsxImage}</td>
        </tr>
        <tr onclick="setYzzb(this)" id="jc-yzzb">
            <td>炎症指标</td>
            <td align="center">${yzzb}</td>
            <td class="view-check-pic" data-id="1">${yzzbxcgImage}</td>
        </tr>
        <tr onclick="setGgnqt(this)" id="jc-ggnqt">
            <td>肝功能全套 </td>
            <td align="center">${ggnqt}</td>
            <td class="view-check-pic" data-id="2">${ggnqtImage}</td>
        </tr>
        <tr onclick="setKfxt(this)" id="jc-kfxt">
            <td>空腹血糖 </td>
            <td align="center">${kfxt}</td>
            <td class="view-check-pic" data-id="3">${kfxtImage}</td>
        </tr>
        <tr onclick="setSgn(this)" id="jc-sgn">
            <td>肾功能 </td>
            <td align="center">${sgn}</td>
            <td class="view-check-pic" data-id="4">${sgnImage}</td>
        </tr>
        <tr onclick="setDjzjc(this)" id="jc-djzjc">
            <td>电解质检查 </td>
            <td align="center">${djzjjc}</td>
            <td class="view-check-pic" data-id="5">${djzjjcImage}</td>
        </tr>
        <tr onclick="setXzqt(this)" id="jc-xzqt">
            <td>血脂全套 </td>
            <td align="center">${xzqt}</td>
            <td class="view-check-pic" data-id="6">${xzqtImage}</td>
        </tr>
        <tr onclick="setJzpxjs(this)" id="jc-jzpxjs">
            <td>甲状旁腺激素</td>
            <td align="center">${jzpxjs}</td>
            <td class="view-check-pic" data-id="7">${jzpxjsImage}</td>
        </tr>
        <tr onclick="setKtvjc(this)" id="jc-ktvjc">
            <td>KT/V检查 </td>
            <td align="center">${ktvjc}</td>
            <td class="view-check-pic" data-id="8">${ktvjcImage}</td>
        </tr>
        <tr onclick="setBnp(this)" id="jc-bnp">
            <td>BNP </td>
            <td align="center">${bnp}</td>
            <td class="view-check-pic" data-id="18">${bnpImage}</td>
        </tr>
        <tr onclick="setTwx(this)" id="jc-twx">
            <td>铁五项 </td>
            <td align="center">${twx}</td>
            <td class="view-check-pic" data-id="9">${twxImage}</td>
        </tr>
        <tr onclick="setXqfxjm(this)" id="jc-xqfx-jm">
            <td>血气分析(静脉) </td>
            <td align="center">${xqfxjm}</td>
            <td class="view-check-pic" data-id="10">${xqfxjmImage}</td>
        </tr>
        <tr onclick="setXqfxdm(this)" id="jc-xqfx-dm">
            <td> 血气分析(动脉)</td>
            <td align="center">${xqfxdm}</td>
            <td class="view-check-pic" data-id="11">${xqfxdmImage}</td>
        </tr>
        <tr onclick="setCrbsx(this)" id="jc-crbsx">
            <td>传染病五项 </td>
            <td align="center">${crbsx}</td>
            <td class="view-check-pic" data-id="12">${crbsxImage}</td>
        </tr>
        <tr onclick="setGyxlqt(this)" id="jc-gyxlqt">
            <td> 肝炎系列全套</td>
            <td align="center">${gyxlqt}</td>
            <td class="view-check-pic" data-id="13">${gyxlqtImage}</td>
        </tr>
        <tr onclick="setXxb(this)" id="jc-xxb">
            <td>心胸比 </td>
            <td align="center">${xxb}</td>
            <td class="view-check-pic" data-id="14">${xxbImage}</td>
        </tr>
        <tr onclick="setXc(this)" id="jc-xc">
            <td>心超 </td>
            <td align="center">${xc}</td>
            <td class="view-check-pic" data-id="15">${xcImage}</td>
        </tr>
        <tr onclick="setXdt(this)" id="jc-xdt">
            <td>心电图 </td>
            <td align="center">${xdt}</td>
            <td class="view-check-pic" data-id="16">${xdtImage}</td>
        </tr>
        <tr onclick="setXue_c(this)" id="jc-xue_c">
            <td>血沉 </td>
            <td align="center">${xue_c}</td>
            <td class="view-check-pic" data-id="19">${xue_cImage}</td>
        </tr>
        <tr onclick="setPxsx(this)" id="jc-pxsx">
            <td>贫血三项 </td>
            <td align="center">${pxsx}</td>
            <td class="view-check-pic" data-id="20">${pxsxImage}</td>
        </tr>
        <tr onclick="setDbcg(this)" id="jc-dbcg">
            <td>大便常规 </td>
            <td align="center">${dbcg}</td>
            <td class="view-check-pic" data-id="21">${dbcgImage}</td>
        </tr>
        <tr onclick="setNcg(this)" id="jc-ncg">
            <td>尿常规 </td>
            <td align="center">${ncg}</td>
            <td class="view-check-pic" data-id="22">${ncgImage}</td>
        </tr>
        <tr onclick="setXgsx(this)" id="jc-xgsx">
            <td>心梗三项 </td>
            <td align="center">${xgsx}</td>
            <td class="view-check-pic" data-id="23">${xgsxImage}</td>
        </tr>
        <tr onclick="setXjm(this)" id="jc-xjm">
            <td>心肌酶 </td>
            <td align="center">${xjm}</td>
            <td class="view-check-pic" data-id="24">${xjmImage}</td>
        </tr>
    </tbody>
    <br/>
    <div class="justify">中 文 两 端 对 齐</div>
    <br/>
    <div class="justify">中 文 两 端 对 齐
        <span></span>
    </div>
    <div>项目中接触到Web界面设计的问题，要实现文字两端对齐的效果。在网上搜索了一下，差不多都是互相转帖，用的都是类似的技巧项目中接触到Web界面设计的问题，要实现文字两端对齐的效果。在网上搜索了一下，差不多都是互相转帖，用的都是类似的技巧项目中接触到Web界面设计的问题，要实现文字两端对齐的效果。在网上搜索了一下，差不多都是互相转帖，用的都是类似的技巧项目中接触到Web界面设计的问题，要实现文字两端对齐的效果。在网上搜索了一下，差不多都是互相转帖，用的都是类似的技巧</div>
    <script src="./jquery.js"></script>
    <script src="https://unpkg.com/axios/dist/axios.min.js"></script>
    <script>
        function pro() {
            var num = 100,
                a = "1";
            while (num > 1) {
                a += num;
                num--;
            }

        }

        function successCallback(result) {
            console.log("It succeeded with " + result);
        }

        function failureCallback(error) {
            console.log("It failed with " + error);
        }
        var p = new Promise(function (resolve, reject) {
            var a = 1;
            resolve(a);

        }).then(function (data) {
            console.log(data)
            var a = 3;
        }).then(function (data) {
            console.log(data)
        })
        axios.get('./demo.html')
            .then(function (response) {
                console.log(response);
            })
            .catch(function (err) {
                console.log(err);
            });
        //以上请求也可以通过这种方式来发送
        axios.get('./demo.html', {
                params: {
                    ID: 12345
                }
            })
            .then(function (response) {
                console.log(response);
            })
            .catch(function (err) {
                console.log(err);
            });
    </script>
</body>

</html>